package threadlocal;

public class Transfer<T> extends ThreadLocal<String> implements Runnable {
    private Bank bank;
    private T t;

    public Transfer(Bank bank) {
        this.bank = bank;
    }

    @Override
    public void run() {
        for (int i = 0; i < 10; i++) {
            bank.setInteger();
            System.out.println(Thread.currentThread().getName() + "..." + bank.getInteger());
        }
    }

    @Override
    public String initialValue() {
        return "";
    }

}
